package com.atguigu.assionexcel.thread;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;

/**
 * @author senior   描述：消费型接口，有一个输入参数，没有返回值
 * @create 2021-11-30 10:30
 */
public class MyFunctionInterface {
    public static void main(String[] args) {
//        Supplier<Integer> supplier = new Supplier<Integer>() {
//            @Override
//            public Integer get() {
//                return 1024;
//            }
//        };
        /*使用lambda表达式改写 */
        Supplier<Integer> supplier = () ->{return 1024;};
        System.out.println(supplier.get());

    }
}
